str1 = 'hello world'
# while 遍历
i = 0
while i < len(str1):
    print(str1[i])
    i += 1

# for 遍历
for item in str1:
    print(item)